-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor HAL as singleton #23295
Refactor HAL as singleton #23295
Conversation
9bcae4b
to
c8f377e
Compare
239660c
to
2534e4e
Compare
9c74c51
to
b36628a
Compare
@p3p — This is going to affect https://github.com/p3p/MarlinSimUI/blob/master/src/MarlinSimulator/marlin_hal_impl/HAL.cpp but it looks like not much else there, so I can submit a patch for MarlinSimUI soon to go along with this. |
b36628a
to
a561ac1
Compare
0c53a99
to
9b5ce13
Compare
I'm very familiar with CRTP. (See #21344 #20959 #20913 #20783.) You'll find CRTP used or at least approached in the |
This reverts commit e211ff1.
This reverts commit e211ff1.
This change prevents my BTT002 & SKR 2 builds from booting. There's also a report on Discord for RAMPS. I suspect this affects all builds, but I'll work through my other machines/boards later today. |
@thisiskeithb , confirm on SKR 2 |
Filed as an issue: |
commit 1a6dbcb Merge: eebf187 56ac681 Author: Foxies-CSTL <Foxies-CSTL@users.noreply.github.com> Date: Sun Dec 26 19:02:32 2021 +0100 Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x commit 56ac681 Author: Scott Lahteine <thinkyhead@users.noreply.github.com> Date: Sun Dec 26 03:20:29 2021 -0600 🎨 Pins and SDIO cleanup commit 7762df7 Author: EvilGremlin <22657714+EvilGremlin@users.noreply.github.com> Date: Sun Dec 26 09:46:13 2021 +0300 🔧 Check Chiron LCD requirements (MarlinFirmware#23353) Co-Authored-By: EvilGremlin <22657714+EvilGremlin@users.noreply.github.com> commit 6a8b927 Author: Scott Lahteine <thinkyhead@users.noreply.github.com> Date: Sat Dec 25 23:15:17 2021 -0600 ⏪️ Refactor still needs work Reverting MarlinFirmware#23295 commit 00e6e90 Author: Scott Lahteine <thinkyhead@users.noreply.github.com> Date: Sat Dec 25 22:10:47 2021 -0600 🐛 Fix adc_start for AVR, native Followup to MarlinFirmware#23295 commit 555c749 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat Dec 25 19:41:01 2021 -0800 🐛 Fix MKS Robin E3 NeoPixel pin default (MarlinFirmware#23350) commit a47f559 Author: Robby Candra <robbycandra.mail@gmail.com> Date: Sun Dec 26 10:36:09 2021 +0700 🐛 HAL refactor followup (MarlinFirmware#23354) commit 57315f0 Author: Scott Lahteine <thinkyhead@users.noreply.github.com> Date: Sat Dec 25 21:25:47 2021 -0600 🐛 Fix missing ADC method commit d7af619 Author: kaidegit <60053077+kaidegit@users.noreply.github.com> Date: Sun Dec 26 10:12:20 2021 +0800 🐛 Fix open for bin rename (MarlinFirmware#23351) commit 4f0932e Author: Scott Lahteine <thinkyhead@users.noreply.github.com> Date: Sat Dec 25 20:00:48 2021 -0600 🐛 Fix `freeMemory` endless loop Followup to MarlinFirmware#23295 commit bdb0716 Author: thinkyhead <thinkyhead@users.noreply.github.com> Date: Sun Dec 26 01:09:46 2021 +0000 [cron] Bump distribution date (2021-12-26) commit fca6d12 Author: Scott Lahteine <thinkyhead@users.noreply.github.com> Date: Sat Dec 25 03:27:45 2021 -0600 🔧 Move MOTHERBOARD closer to top commit c74161c Author: fflosi <34758322+fflosi@users.noreply.github.com> Date: Sat Dec 25 05:57:07 2021 -0300 ✨ Per-axis TMC hold multiplier (MarlinFirmware#23345) commit a941cd3 Author: Scott Lahteine <thinkyhead@users.noreply.github.com> Date: Fri Dec 24 23:47:52 2021 -0600 🔨 Configurable firmware bin filename Configuration.h > FIRMWARE_BIN commit e211ff1 Author: Scott Lahteine <thinkyhead@users.noreply.github.com> Date: Fri Dec 24 21:33:59 2021 -0600 ♻️ Refactor HAL as singleton (MarlinFirmware#23295) commit 532f21f Author: Scott Lahteine <thinkyhead@users.noreply.github.com> Date: Fri Dec 24 21:32:00 2021 -0600 🔨 Ignore sublime workspace file commit cd1920b Author: Scott Lahteine <thinkyhead@users.noreply.github.com> Date: Fri Dec 24 20:59:28 2021 -0600 🔨 Ignore cmake generated build folder commit 6d09d1d Author: thinkyhead <thinkyhead@users.noreply.github.com> Date: Sat Dec 25 01:04:01 2021 +0000 [cron] Bump distribution date (2021-12-25) commit d5dff19 Author: Scott Lahteine <thinkyhead@users.noreply.github.com> Date: Fri Dec 24 01:46:51 2021 -0600 🔧 Sanity check MMU2_MENUS commit 21cd715 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Fri Dec 24 14:03:32 2021 +0800 ✨ MKS TinyBee board support (MarlinFirmware#23340) Co-Authored-By: Sola <42537573+solawc@users.noreply.github.com> commit 80a537c Author: Attila BODY <attila.body@gmail.com> Date: Fri Dec 24 06:57:20 2021 +0100 🐛 Fix Robin Nano v3 filament runout pins (MarlinFirmware#23344) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> commit ca0215b Author: thinkyhead <thinkyhead@users.noreply.github.com> Date: Fri Dec 24 01:04:40 2021 +0000 [cron] Bump distribution date (2021-12-24) commit df9eb56 Author: MrAlvin <umo-testing@3iii.dk> Date: Thu Dec 23 10:47:52 2021 +0100 🚸 Show mm'ss during first hour (MarlinFirmware#23335) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> commit 3e737cb Author: Robby Candra <robbycandra.mail@gmail.com> Date: Thu Dec 23 15:19:39 2021 +0700 🔧 Group FAST_PWM_FAN.options (MarlinFirmware#23331) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> commit da67deb Author: Tanguy Pruvot <tpruvot@users.noreply.github.com> Date: Thu Dec 23 08:32:27 2021 +0100 ✏️ Fix missing brace (MarlinFirmware#23337) Followup to MarlinFirmware#22916 Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> commit 1b876c1 Author: Tanguy Pruvot <tpruvot@users.noreply.github.com> Date: Thu Dec 23 07:49:15 2021 +0100 🩹 Fix settings G21 report (MarlinFirmware#23338) commit c80ef71 Author: thinkyhead <thinkyhead@users.noreply.github.com> Date: Thu Dec 23 01:05:31 2021 +0000 [cron] Bump distribution date (2021-12-23) commit 2893048 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Tue Dec 21 23:09:55 2021 -0500 ✨ BLTouch High Speed mode runtime configuration (MarlinFirmware#22916) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> commit c1dba3d Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed Dec 22 15:44:04 2021 +1300 ✨ Option to reset EEPROM on first run (MarlinFirmware#23276) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> commit fdd37a8 Author: thinkyhead <thinkyhead@users.noreply.github.com> Date: Wed Dec 22 01:07:10 2021 +0000 [cron] Bump distribution date (2021-12-22) commit 9cee626 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed Dec 22 13:48:38 2021 +1300 🐛 Fix Chitu Z_STOP_PIN (MarlinFirmware#23330) commit f374fa0 Author: Mike La Spina <mike.laspina@shaw.ca> Date: Tue Dec 21 01:26:31 2021 -0600 🚑️ FAST_PWM_FAN default 1KHz base freq. (MarlinFirmware#23326) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> commit b06f871 Author: thinkyhead <thinkyhead@users.noreply.github.com> Date: Tue Dec 21 01:08:00 2021 +0000 [cron] Bump distribution date (2021-12-21)
Followup to MarlinFirmware#23295
Start to wrap HAL methods in a simple
MarlinHAL
class for the sake of encapsulation. Since HAL Timer methods are also a core part of hardware, like interrupts generally, ADC, and PWM, the HAL timer functions may also get added to this class.